﻿Imports System.Data.OleDb
Imports BUS
Imports DTO
Public Class frmQuyDinh
    Private tsBus As New ThamSoBUS()
    Protected Function ConnectionData() As OleDbConnection
        Dim strCn As String
        strCn = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = QLKS.mdb"
        Dim cn As New OleDbConnection(strCn)
        cn.Open()
        Return cn
    End Function
    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub

    Private Sub btnThayDoi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThayDoi.Click
        Dim str As String
        str = MsgBox("Sửa dữ liệu?", MsgBoxStyle.YesNo, "Chú ý! chú ý!")
        If str = "6" Then
            Try
                Dim dt As New DataTable
                dt = tsBus.LayBang()
                Dim dr As DataRow
                dr = dt.NewRow()              
                dr("TiLePhuThu") = txtPhuthu.Text
                tsBus.SuaTiLePhuThuBUS(dr)
                MessageBox.Show("Sửa thành công", "Thông báo !", MessageBoxButtons.OK, MessageBoxIcon.Information)
            Catch ex As Exception

            End Try
        End If
    End Sub
End Class